import React from "react";
import "./index.less";
import { withRouter } from "react-router-dom";
class TaskInfo extends React.Component {
  constructor(props) {
    super(props);
    this.state = {};
  }

  componentWillMount() {}

  render() {
    return (
      <div
        className="taskInfo flex flex-column"
        onClick={() => {
          this.props.history.push( `taskDetail?id=${this.props.item.id}`);
        }}
      >
        <div className="flex flex-between">
          <div className="ft-17 col-262626 ft-bold">
            {this.props.item.task.name}
          </div>
          <div className="ft-13">
            <span className="ft-17 col-FF8A72">{this.props.item.amount}</span>元
          </div>
        </div>
        <p className="col-8C8C8C ellipsis">{this.props.item.task.content} </p>
        <div className="flex flex-between mt-25">
          <div className="col-595959">{this.props.item.merchant.merName}</div>
          <div className="col-8C8C8C">
            {this.props.item.merchant.createDate}
          </div>
        </div>
      </div>
    );
  }
}

export default withRouter(TaskInfo);
